Field of the Invention
The present invention relates to an image processing apparatus, an information processing method and a program.
Description of the Related Art
Conventionally, an example of white balance setting of an imaging apparatus, such as a digital still camera, includes an auto white balance (hereinafter, called AWB) mode in which the imaging apparatus automatically sets the white balance suitable for a captured image.
An example of the calculation method of AWB includes a method of extracting data of an image region of captured image data (RGB data) considered to be achromatic, and gains of R components and B components of color components included in the image region are adjusted to make the image region achromatic. Hereinafter, the extraction of the data of the image region considered to be achromatic will be called white detection.
Meanwhile, if photographing is performed at a shutter speed higher than a flickering period under a flicker light source, such as a fluorescent light, that periodically repeats blinking, there is a problem that the color of the captured image changes depending on the timing of photographing as illustrated in FIG. 1. FIG. 1 is an example of a change in signal levels of the RGB signals of the imaging apparatus in one blinking period of the flicker light source, and the signal levels of RGB are different in each time. In FIG. 1, a signal 201 indicates a signal of G, a signal 202 indicates a signal of B, and a signal 203 indicates a signal of R. In FIG. 1, the color ratio of RGB in a case in which photographing is performed in a period indicated by a period 204 is different from the color ratio of RGB in a case in which photographing is performed in a period indicated by a period 205. As a result, the color of the image changes in each photographing depending on the timing of photographing.
To solve the problem, an imaging apparatus is devised in recent years, in which a flicker waveform of a light source is detected at photographing, and photographing is performed at a peak position with the highest signal level in the flicker waveform. For example, in the case of the light source of FIG. 1, photographing is always performed at the timing of the period 204. As a result, photographing can be performed with the same color even when photographing is repeated many times, and the color change under the flicker light source can be suppressed. Hereinafter, the photographing method will be called flicker-less photographing.
In the flicker-less photographing, the color does not change in each photographing under the same shutter speed. However, the color changes if the shutter speed changes.
FIG. 2 is a diagram illustrating an example in which flicker-less photographing is performed at different shutter speeds under a flicker light source. In FIG. 2, a signal 301 indicates a temporal change in the signal level of a G signal. A signal 302 indicates a temporal change in the signal level of a B signal. A signal 303 indicates a temporal change in the signal level of an R signal.
In FIGS. 2, 304 and 305 indicate that although photographing is performed around the peak position of the flicker waveform, the shutter speed of 304 is higher than the shutter speed of 305 (exposure time is shorter). As illustrated in FIG. 2, the timing is set to perform photographing at the peak position of the flicker waveform, but the color changes when the shutter speed changes.
FIG. 3 is a diagram illustrating an example of flicker-less photographing under another flicker light source. In FIG. 3, the peak positions of the signals of RGB are different. In FIG. 3, a signal 401 indicates a temporal change in the signal level of a G signal. A signal 402 indicates a temporal change in the signal level of a B signal. A signal 403 indicates a temporal change in the signal level of an R signal. In this case, the color change in each photographing can be suppressed by performing photographing based on, for example, the peak position of the signal 401 in flicker-less photographing.
However, when the shutter speed changes in the case illustrated in FIG. 3, the color changes even if photographing is performed at the same peak position as indicated by a period 404 and a period 405 of FIG. 3.
The calculation of the AWB in the flicker-less photographing has the following problem.
In a system without flicker-less photographing, photographing under a flicker light source, such as a fluorescent light, is based on photographing at a low-speed shutter speed longer than the flickering period of the light source that is unlikely to be affected by the flicker. Therefore, a white detection range of the white detection unit for the AWB calculation is a range indicated in FIG. 4 that allows detection of the color of the fluorescent light with the low-speed shutter. FIG. 4 is a diagram illustrating a plot range of R/G and B/G signals when various fluorescent lights are captured at a low shutter speed. In FIG. 4, a trajectory 501 indicates a black-body radiation trajectory. A plot position 502 is a plot position when a white fluorescent light is captured with the low-speed shutter. A plot position 503 is a plot position when a white daylight fluorescent light is captured with the low-speed shutter. A plot position 504 is a plot position when a daylight fluorescent light is captured with the low-speed shutter. A plot position 505 is a plot position when a three-wavelength daylight fluorescent light is captured with the low-speed shutter. A plot position 506 is a plot position when a three-wavelength white daylight fluorescent light is captured with the low-speed shutter. Conventionally, the white detection range is set as indicated by a white detection range 507 of FIG. 4 such that the colors of the fluorescent lights with the low-speed shutter fall within the detection range.
However, photographing with the high-speed shutter under the flicker light source is possible at flicker-less photographing. In FIG. 5, plot positions 601 to 605 are plot positions when the white fluorescent light, the white daylight fluorescent light, the daylight fluorescent light, the three-wavelength daylight fluorescent light and the three-wavelength white daylight fluorescent light are captured with the high-speed shutter. In this way, when photographing is performed at a high shutter speed under the flicker light source in the flicker-less photographing, the plot positions of the fluorescent lights change from the plot positions with the low-speed shutter as illustrated in FIG. 5. As a result, the fluorescent lights may be plotted outside of the white detection range, or the white balance may not be appropriately calculated. Colors of the regions in which the fluorescent lights are not plotted may be included in the white detection range, or colors of the object that need to be removed from the detection target may be easily detected.
Conventionally, an example of means for calculating appropriate white balance under a fluorescent light includes a technique disclosed in Japanese Patent Application Laid-Open No. 2006-287362, in which a color detection range for a fluorescent light is set when a flicker is detected.